// 授信状态
export const creditStatusFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    none: '未授信',
    process: '授信中',
    success: '授信成功',
    fail: '授信失败'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 风控状态
export const riskStatusFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    init: '待授信',
    execute: '执行中',
    process: '处理中',
    error: '执行异常',
    success: '成功',
    fail: '失败',
    dead: '僵死'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 签约状态
export const assignStatusFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    init: '待执行',
    execute: '执行中',
    process: '处理中',
    error: '执行异常',
    success: '成功',
    fail: '失败',
    dead: '僵死'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 借款状态
export const loanStatusFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    init: '审核中',
    pass: '审核通过',
    refuse: '审核拒绝',
    execute: '执行中',
    process: '处理中',
    error: '执行异常',
    repay: '待还款',
    fail: '失败',
    dead: '僵死',
    success: '成功',
    clean: '结清',
    cancel: '撤销'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 还款状态
export const repayStatusFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    init: '待执行',
    execute: '执行中',
    process: '处理中',
    error: '执行异常',
    success: '成功',
    fail: '失败',
    dead: '僵死'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 教育程度
export const educationFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    unknown: '未知', // 未知
    doctor: '博士', // 博士
    master_above: '硕士', // 硕士
    undergraduate: '本科', // 本科
    junior_college: '大专', // 大专
    secondary_school: '中专', // 中专
    senior_below: '高中及以下' // 高中及以下
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 教育程度
export const marriageFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    unknown: '未知',
    unmarried: '未婚',
    married: '已婚',
    bereft_spouse: '丧偶',
    divorce: '离异'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 收入区间
export const monthIncomeFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    unknown: '未知', // 未知
    '0_3000': '3000元及以下', // 3000元及以下
    '3001_6000': '3001元到6000元', // 3001元到6000元
    '6001_12000': '6001元到10000元', // 6001元到10000元
    '12001_20000': '10001元到20000元', // 10001元到20000元
    '20001_above': '20000以上' // 20000以上
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 关系类型
export const relationFilter = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    other: '其他',
    spouse: '配偶',
    parents: '父母',
    children: '子女',
    brothers_sisters: '兄弟姐妹',
    relatives: '亲属',
    friends: '朋友',
    classmate: '同学',
    colleagues: '同事'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 工作状态
export const workStatus = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    unknown: '未知', // 未知
    full_time: '全职',
    part_time: '兼职',
    self_employed: '自雇',
    student: '在校学生'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 优惠券类型
export const couponType = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    discount: '折扣券',
    cash: '代金券',
    interest_free_term: '按期免息券',

    interest_free_day: '按天免息券'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 优惠券类型
export const couponStatus = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    enabled: '启用',
    disabled: '禁用'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 活动类型
export const activityType = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    regular: '普通活动',
    coupon: '优惠券活动'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
export const activityStatus = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    enabled: '有效',
    disabled: '失效'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
export const couponScene = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    register: '注册成功',
    credit: '授信成功',
    clean: '结清贷款',
    activity: '参与活动'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
export const couponRecordStatus = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    new: '未使用',
    used: '已使用',
    expired: '已过期'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
export const attachmentStatus = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    new: '未使用',
    used: '已使用',
    expired: '已过期'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
export const faceStatus = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    init: '待识别',
    success: '识别成功',
    fail: '识别失败',
    used: '识别已使用'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
// 新增产品业务场景
export const businessSceneFormat = (status: string | number) => {
  status = status + ''
  const statusMap: { [key: string]: string } = {
    self_loan: '自营贷',
    assistance_loan: '助贷',
    joint_loan: '联合贷'
  }
  return statusMap[status] ? statusMap[status] : '-'
}
